<template>
	<view>
		<view class="title">常见问题解答</view>
		<view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg">
			<view class="cu-item arrow" v-for="(item, index) in addList" :key='index' @click="errpanel(item.id)">
				<view class="content">
					<text class=""></text>
					<text class="text-grey">{{item.content}}</text>
				</view>
			</view>
			<!-- <view class="cu-item arrow" @click="errpanel(2)">
				<view class="content">
					<text class=""></text>
					<text class="text-grey">一键克隆如何使用?</text>
				</view>
			</view>
			<view class="cu-item arrow" @click="errpanel(3)">
				<view class="content">
					<text class=""></text>
					<text class="text-grey">支付相关问题</text>
				</view>
			</view> -->
		</view>
	</view>	
</template>

<script>
	export default {
		data() {
			return {
				addList : [],
				phone:''
			}
		},
		onLoad(){
			// uni.onSocketMessage(function (res) {
			//   console.log('收到服务器内容：' + res.data);
			// });
			this.initDat();
		},
		onShow(){
			this.$msgchat.initwork();
		},
		methods: {
			//初始化数据
			initDat(){
				this.$common.requests('/api/Problem/problemIndex').then(res => {
					if(res.data.code == 1){
						this.addList = res.data.data;
					}
				})
			},
			errpanel(id){
				uni.navigateTo({
					url:'../../errpanel/errpanel?id='+ id
				})
			}
		}
	}
</script>

<style lang="scss">
		page{
			height: 100%;
			background: $uni-color-bei;
		}
		.title{
			padding: 20upx 0 20upx 20upx;
		}
		.cu-list{
			background: #fff;
			margin-left: 0!important;
			margin-right: 0!important;
			border-radius: 0!important;
			margin-top: 0;
		}
		.text-grey{
			color: $uni-text-color;
		}
</style>
